package main

import (
	"torler.com/qingyue/apps/backend/config"
	"torler.com/qingyue/apps/backend/internal/app"
	"torler.com/qingyue/pkg/logger"
)

func main() {
	if err := config.LoadConfig(); err != nil {
		panic(err)
	}
	logger.Init(config.GetConfig().Log)
	app := app.NewApp("后端接口服务", config.GetConfig())
	if err := app.Init(); err != nil {
		panic(err)
	}

	// 启动所有服务器
	httpServer := app.ApiMgr.GetServer()

	app.AddServer(httpServer)
	app.Run()

}
